home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / a_utils / perl / mac-perl / mcprl401.bin / Perl_appl / lib / shellwords.pl < prev    next >
MacBinary  |  1992-09-27  |  1.5 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Sun Sep 27 18:04:21 1992, modified Sun Sep 27 18:04:21 1992, creator 'MPS ', type ASCII, 888 bytes "shellwords.pl" , at 0x3f8 428 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 73 68 65 6c 6c 77 | 6f 72 64 73 2e 70 6c 00 |..shellw|ords.pl.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 03 78 00 | 00 01 ac a6 eb e0 65 a6 |......x.|......e.|
|00000060| eb e0 65 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..e.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 cb 37 00 00 |........|.....7..|
|00000080| 3b 23 20 73 68 65 6c 6c | 77 6f 72 64 73 2e 70 6c |;# shell|words.pl|
|00000090| 0d 3b 23 0d 3b 23 20 55 | 73 61 67 65 3a 0d 3b 23 |.;#.;# U|sage:.;#|
|000000a0| 09 72 65 71 75 69 72 65 | 20 27 73 68 65 6c 6c 77 |.require| 'shellw|
|000000b0| 6f 72 64 73 2e 70 6c 27 | 3b 0d 3b 23 09 40 77 6f |ords.pl'|;.;#.@wo|
|000000c0| 72 64 73 20 3d 20 26 73 | 68 65 6c 6c 77 6f 72 64 |rds = &s|hellword|
|000000d0| 73 28 24 6c 69 6e 65 29 | 3b 0d 3b 23 09 6f 72 0d |s($line)|;.;#.or.|
|000000e0| 3b 23 09 40 77 6f 72 64 | 73 20 3d 20 26 73 68 65 |;#.@word|s = &she|
|000000f0| 6c 6c 77 6f 72 64 73 28 | 40 6c 69 6e 65 73 29 3b |llwords(|@lines);|
|00000100| 0d 3b 23 09 6f 72 0d 3b | 23 09 40 77 6f 72 64 73 |.;#.or.;|#.@words|
|00000110| 20 3d 20 26 73 68 65 6c | 6c 77 6f 72 64 73 3b 09 | = &shel|lwords;.|
|00000120| 09 23 20 64 65 66 61 75 | 6c 74 73 20 74 6f 20 24 |.# defau|lts to $|
|00000130| 5f 20 28 61 6e 64 20 63 | 6c 6f 62 62 65 72 73 20 |_ (and c|lobbers |
|00000140| 69 74 29 0d 0d 73 75 62 | 20 73 68 65 6c 6c 77 6f |it)..sub| shellwo|
|00000150| 72 64 73 20 7b 0d 20 20 | 20 20 70 61 63 6b 61 67 |rds {. | packag|
|00000160| 65 20 73 68 65 6c 6c 77 | 6f 72 64 73 3b 0d 20 20 |e shellw|ords;. |
|00000170| 20 20 6c 6f 63 61 6c 28 | 24 5f 29 20 3d 20 6a 6f | local(|$_) = jo|
|00000180| 69 6e 28 27 27 2c 20 40 | 5f 29 20 69 66 20 40 5f |in('', @|_) if @_|
|00000190| 3b 0d 20 20 20 20 6c 6f | 63 61 6c 28 40 77 6f 72 |;. lo|cal(@wor|
|000001a0| 64 73 2c 24 73 6e 69 70 | 70 65 74 2c 24 66 69 65 |ds,$snip|pet,$fie|
|000001b0| 6c 64 29 3b 0d 0d 20 20 | 20 20 73 2f 5e 5c 73 2b |ld);.. | s/^\s+|
|000001c0| 2f 2f 3b 0d 20 20 20 20 | 77 68 69 6c 65 20 28 24 |//;. |while ($|
|000001d0| 5f 20 6e 65 20 27 27 29 | 20 7b 0d 09 24 66 69 65 |_ ne '')| {..$fie|
|000001e0| 6c 64 20 3d 20 27 27 3b | 0d 09 66 6f 72 20 28 3b |ld = '';|..for (;|
|000001f0| 3b 29 20 7b 0d 09 20 20 | 20 20 69 66 20 28 73 2f |;) {.. | if (s/|
|00000200| 5e 22 28 28 5b 5e 22 5c | 5c 5d 7c 5c 5c 5b 5c 5c |^"(([^"\|\]|\\[\\|
|00000210| 22 5d 29 2a 29 22 2f 2f | 29 20 7b 0d 09 09 28 24 |"])*)"//|) {...($|
|00000220| 73 6e 69 70 70 65 74 20 | 3d 20 24 31 29 20 3d 7e |snippet |= $1) =~|
|00000230| 20 73 23 5c 5c 28 2e 29 | 23 24 31 23 67 3b 0d 09 | s#\\(.)|#$1#g;..|
|00000240| 20 20 20 20 7d 0d 09 20 | 20 20 20 65 6c 73 69 66 | }.. | elsif|
|00000250| 20 28 2f 5e 22 2f 29 20 | 7b 0d 09 09 64 69 65 20 | (/^"/) |{...die |
|00000260| 22 55 6e 6d 61 74 63 68 | 65 64 20 64 6f 75 62 6c |"Unmatch|ed doubl|
|00000270| 65 20 71 75 6f 74 65 3a | 20 24 5f 5c 6e 22 3b 0d |e quote:| $_\n";.|
|00000280| 09 20 20 20 20 7d 0d 09 | 20 20 20 20 65 6c 73 69 |. }..| elsi|
|00000290| 66 20 28 73 2f 5e 27 28 | 28 5b 5e 27 5c 5c 5d 7c |f (s/^'(|([^'\\]||
|000002a0| 5c 5c 5b 5c 5c 27 5d 29 | 2a 29 27 2f 2f 29 20 7b |\\[\\'])|*)'//) {|
|000002b0| 0d 09 09 28 24 73 6e 69 | 70 70 65 74 20 3d 20 24 |...($sni|ppet = $|
|000002c0| 31 29 20 3d 7e 20 73 23 | 5c 5c 28 2e 29 23 24 31 |1) =~ s#|\\(.)#$1|
|000002d0| 23 67 3b 0d 09 20 20 20 | 20 7d 0d 09 20 20 20 20 |#g;.. | }.. |
|000002e0| 65 6c 73 69 66 20 28 2f | 5e 27 2f 29 20 7b 0d 09 |elsif (/|^'/) {..|
|000002f0| 09 64 69 65 20 22 55 6e | 6d 61 74 63 68 65 64 20 |.die "Un|matched |
|00000300| 73 69 6e 67 6c 65 20 71 | 75 6f 74 65 3a 20 24 5f |single q|uote: $_|
|00000310| 5c 6e 22 3b 0d 09 20 20 | 20 20 7d 0d 09 20 20 20 |\n";.. | }.. |
|00000320| 20 65 6c 73 69 66 20 28 | 73 2f 5e 5c 5c 28 2e 29 | elsif (|s/^\\(.)|
|00000330| 2f 2f 29 20 7b 0d 09 09 | 24 73 6e 69 70 70 65 74 |//) {...|$snippet|
|00000340| 20 3d 20 24 31 3b 0d 09 | 20 20 20 20 7d 0d 09 20 | = $1;..| }.. |
|00000350| 20 20 20 65 6c 73 69 66 | 20 28 73 2f 5e 28 5b 5e | elsif| (s/^([^|
|00000360| 5c 73 5c 5c 27 22 5d 2b | 29 2f 2f 29 20 7b 0d 09 |\s\\'"]+|)//) {..|
|00000370| 09 24 73 6e 69 70 70 65 | 74 20 3d 20 24 31 3b 0d |.$snippe|t = $1;.|
|00000380| 09 20 20 20 20 7d 0d 09 | 20 20 20 20 65 6c 73 65 |. }..| else|
|00000390| 20 7b 0d 09 09 73 2f 5e | 5c 73 2b 2f 2f 3b 0d 09 | {...s/^|\s+//;..|
|000003a0| 09 6c 61 73 74 3b 0d 09 | 20 20 20 20 7d 0d 09 20 |.last;..| }.. |
|000003b0| 20 20 20 24 66 69 65 6c | 64 20 2e 3d 20 24 73 6e | $fiel|d .= $sn|
|000003c0| 69 70 70 65 74 3b 0d 09 | 7d 0d 09 70 75 73 68 28 |ippet;..|}..push(|
|000003d0| 40 77 6f 72 64 73 2c 20 | 24 66 69 65 6c 64 29 3b |@words, |$field);|
|000003e0| 0d 20 20 20 20 7d 0d 20 | 20 20 20 40 77 6f 72 64 |. }. | @word|
|000003f0| 73 3b 0d 7d 0d 31 3b 0d | 00 00 00 00 00 00 00 00 |s;.}.1;.|........|
|00000400| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00000410| 6e 6c 65 73 73 20 24 54 | 5a 20 65 71 20 27 27 3b |nless $T|Z eq '';|
|00000420| 0d 0d 20 20 20 20 24 79 | 65 61 72 20 2b 3d 20 28 |.. $y|ear += (|
|00000430| 0d 73 68 65 6c 6c 77 6f | 72 64 73 2e 70 6c 02 00 |.shellwo|rds.pl..|
|00000440| 00 00 54 45 58 54 4d 50 | 53 20 00 00 00 00 00 00 |..TEXTMP|S ......|
|00000450| 00 00 54 45 58 54 4d 50 | 53 20 00 00 00 00 00 00 |..TEXTMP|S ......|
|00000460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000470| 00 00 a6 ea b4 78 00 00 | 03 78 00 00 01 ac 20 20 |.....x..|.x.... |
|00000480| 24 44 6f 57 5b 24 77 64 | 61 79 5d 2c 20 24 4d 6f |$DoW[$wd|ay], $Mo|
|00000490| 59 5b 24 6d 6f 6e 5d 2c | 20 24 6d 64 61 79 2c 20 |Y[$mon],| $mday, |
|000004a0| 24 68 6f 75 72 2c 20 24 | 6d 69 6e 2c 20 24 73 65 |$hour, $|min, $se|
|000004b0| 63 2c 20 24 54 5a 2c 20 | 24 79 65 61 72 29 3b 0d |c, $TZ, |$year);.|
|000004c0| 7d 0d 31 3b 0d 01 df 1a | 00 00 00 00 00 0e 07 72 |}.1;....|.......r|
|000004d0| 65 71 75 69 72 65 00 01 | da 21 00 00 00 00 00 0e |equire..|.!......|
|000004e0| 06 72 65 6e 61 6d 65 01 | 00 01 d9 5c 00 00 00 00 |.rename.|...\....|
|000004f0| 00 0c 04 72 65 64 6f 6c | 00 01 d4 7c 00 00 00 00 |...redol|...|....|
|00000500| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 70 6c 27 |...H..Mo|naco.pl'|
|00000510| 3b 0d 3b 23 09 40 77 6f | 72 64 73 20 3d 20 26 73 |;.;#.@wo|rds = &s|
|00000520| 68 65 6c 6c 77 6f 00 06 | 00 08 00 3c 00 24 01 dd |hellwo..|...<.$..|
|00000530| 02 3d 00 3c 00 24 01 dd | 02 3d a6 eb a8 25 00 00 |.=.<.$..|.=...%..|
|00000540| 02 95 00 00 02 95 00 00 | 00 00 01 00 00 00 00 1e |........|........|
|00000550| 00 3c 00 24 01 dd 02 3d | 00 3c 00 24 01 dd 02 3d |.<.$...=|.<.$...=|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000570| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 00 41 |.....n..|.n...>.A|
|00000580| 62 20 0f 6e 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |b .n....|.>..MPSR|
|00000590| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|000005a0| 03 f0 ff ff 00 00 00 4c | 00 47 94 a4 00 00 00 00 |.......L|.G......|
|000005b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+